[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+------------+#############################################################
#+-| PICK_STR() |-------------------------------+#############################
#| +------------+ Returns the string associated |#############################
#| with pick list value pvalue |#############################
#+----------------------------------------------+#############################
##############################################################################
##############################################################################
#+--| Summary |--------------+################################################
#| #INCLUDE pick.hdr |################################################
#+---------------------------+################################################
##############################################################################
##############################################################################
#+--| Syntax |--------------------------------------------+###################
#| FUNCTION CHAR pick_str PROTOTYPE |###################
#| PARAMETERS VALUE LONG plist, VALUE INT pvalue |###################
#+--------------------------------------------------------+###################
##############################################################################
##############################################################################
########+---| Description |------------------------------------------+########
########| This function returns the string associated with the pick |########
########| list value pvalue. pvalue is initialized by the pick_list |########
########| procedure. Strings are entered in order into a pick list |########
########| by pick_add. That is, the first string entered is string |########
########| number 1, the second is string number 2, etc.. |########
########| ---------------------------------------------------------- |########
########| When a user selects a position within a pick list by |########
########| pressing enter, pick_list returns the numeric value of the |########
########| string. To retrieve the actual string value, |########
########| use pick_str(). |########
########+------------------------------------------------------------+########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Get the 4th and 1st element from a pick list. |#########
#########| |#########
#########| plist = pick_init() |#########
#########| pick_add( plist, "this" ) |#########
#########| pick_add( plist, "is" ) |#########
#########| pick_add( plist, "a" ) |#########
#########| pick_add( plist, "test" ) |#########
#########| |#########
#########| ? pick_str( plist, 4 ), pick_str( plist, 1 ) |#########
#########| |#########
#########| OUTPUT: |#########
#########| |#########
#########| "this test" |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Confirm a users choice. |#########
#########| |#########
#########| pick_list(pl, r1,c1, r2,c2, p, .F., .F. ) |#########
#########| IF p <> 0 |#########
#########| @ 4,10 ?? "You selected "+pick_str( p ) |#########
#########| @ 5,10 ?? "Is this correct? " |#########
#########| REPEAT |#########
#########| z = get_key() |#########
#########| |#########
#########| *--- convert key to upper case |#########
#########| |#########
#########| IF z >= 'a' .AND. z=< 'z' |#########
#########| z = z - 'a' + 'A' |#########
#########| ENDIF |#########
#########| |#########
#########| UNTIL z = 'Y' .OR. z = 'N' |#########
#########| {...} |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
pick_add
pick_clear
pick_init()
pick_list
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson